<template>
	<!-- 扫码点餐 -->
	<view style="background: #F8F8F8;height: 100vh;">
		<view class="" :style="{paddingTop:h +'px' }" style="background-color: #fff;"></view>
		<view class="head flex align-center">
			<view class="home flex-c">
				<text class="cuIcon-home" @click="handleback"></text>
			</view>
			<navigator :url="'/pageB/index/search?mch_id='+mch_id+'&table_id='+table_id">
				<view class="search flex align-center justify-center">
					<image class="img1" src="/static/search.png" mode="widthFix"></image>
					<input type="text" placeholder="搜索店内商品" :value="inputdata" disabled @input="handleinput">
					<!-- <image class="img2" src="/static/x.png" mode="widthFix" @click="handleclose"></image> -->
				</view>
			</navigator>
		</view>
		<view class="bg-white head_title">
			<text>桌号：</text>
			<text class="num">{{table}}</text>
		</view>


		<view class="VerticalBox ">
			<scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="verticalNavTop"
				style="height:calc(100vh - 347upx)">
				<view class="cu-item" :class="index==tabCur?'fen_index cur':''" v-for="(item,index) in list"
					:key="index" @tap="TabSelect" :data-id="index">
					{{item.name}}
				</view>
			</scroll-view>
			<scroll-view class="VerticalMain bg-white" scroll-y scroll-with-animation
				style="height:calc(100vh - 347upx);padding-bottom: 80rpx;">
				<view class="VerticalMain_list">
					<!-- <view class="cu-bar  bg-white"> v-for="(item,index) in list" :key="index" @scroll="VerticalMain" :id="'main-'+index" @scrolltolower="scrolltolower"
						<view class="" v-if="index ==0">{{item.name}}</view> :scroll-into-view="'main-'+mainCur" 
					</view> -->
					<view v-for="(i,t) in goods" :key="t">
						<view class="item flex align-center">
							<image :src="url+i.main_images[0]" mode=""></image>
							<view class="div_text ">
								<view class="flex-cb title_item">
									<view class="title">{{i.name}}</view>
									<view class="num">销量<text style="margin-left: 5rpx;">{{i.sales}}</text></view>
								</view>
								<view class="flex-cb price_f price">
									<text class="">
										<text style="color: #1CD699;">原价:</text>￥
										<text style="font-size: 28rpx;">{{i.sku.spec_list[0].item_list[0].price}}</text>
									</text>
									<text class="jifen flex align-center"
										v-if="i.sku.spec_list[0].item_list[0]['100_point_deduct_amount'] != 0&&i.sku.spec_list[0].item_list[0]['100_point_deduct_amount']">
										{{i.sku.spec_list[0].item_list[0]['point_deduct_max_amount']/(i.sku.spec_list[0].item_list[0]['100_point_deduct_amount']/100)}}积分抵扣￥{{i.sku.spec_list[0].item_list[0]['point_deduct_max_amount']||i.service.point_deduct_max_amount||0}}
									</text>
								</view>
								<view class="flex justify-between" style="position: relative;top: 40rpx;">
									<text class="vipPrice">会员价:￥<text
											style="font-size: 28rpx;">{{i.sku.spec_list[0].item_list[0].vip_price}}</text></text>
									<!-- <text class="jifen flex align-center">积分最多抵扣￥{{i.sku.spec_list[0].item_list[0].point_deduct_max_amount||0}}</text> -->
									<!-- <text></text> -->

									<view class="button flex-c" @click="JG(i,t)">加购</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<view class="foot flex-cb" v-if="!isadd">
			<view class="money flex align-center" @click="iscart = 1">
				<image src="/static/gwc(2).png" mode=""></image>
				<text>￥{{money}}</text>
				<view class="position flex-c" v-if="cartlist.length">{{cartlist.length}}</view>
			</view>
			<view class="button flex-c" @click="got()">去结算</view>
		</view>
		<!-- 购物车 -->
		<view class="modal_view" @click.stop="iscart =0" v-if="iscart">
			<view class="modal_view_div" @click.stop="">
				<view class="text flex-cb">
					<view class="flex align-center">
						<!-- <text class="cuIcon-round" v-if="!isall" @click="handleall(1)"></text>
						<text class="cuIcon-roundcheckfill" v-else @click="handleall(0)"></text> -->
						<text>已选商品</text>
					</view>
					<text @click="deteles">清空</text>
				</view>
				<image src="/static/gwczwsp.png" mode="" v-if="cartlist.length == 0"></image>
				<scroll-view scroll-y="true" class="screen-swiper">
					<view class="cart flex-cb" v-for="(item,index) in cartlist" :key="index">
						<view class="flex align-center">
							<!-- <text class="cuIcon-round" v-if="!item.selected" @click="choice(index)"></text>
							<text class="cuIcon-roundcheckfill" v-else @click="choice(index)"></text> -->
							<image :src="url+item.goods_image" mode=""></image>
							<view class="food">
								<text class="food_name">{{item.goods_title + item.goods_spec_item_name}}</text>
								<view class="">{{item.goods_attribute}}</view>
							</view>
						</view>
						<view class="money">
							<text>￥{{item.goods_price}}</text>
							<view class="flex-cb addnum">
								<text class="flex-c A" @click="__num(item,index)">-</text>
								<view class="center_num flex-c">{{item.number}}</view>
								<text class="flex-c B" @click="addNum(item,index)">+</text>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>

		<!-- 点击加购 -->

		<view class="modal_view" @click="isadd = 0" v-if="isadd">
			<view class="cart2" @click.stop="">
				<view class="img_title2 flex">
					<image :src="url+goods[isfood].main_images[0]" mode=""></image>
					<view>
						<view class="title2">{{goods[isfood].name}}</view>
						<view class="money2 flex-cb">
							<text style="font-size: 30rpx;color: #FF2E2E;">
								<text
									style="color: #1CD699;">原价</text>￥{{goods[isfood].sku.spec_list[0].item_list[jj].price}}
							</text>
							<text
								class="vipPrice2">会员价￥{{goods[isfood].sku.spec_list[0].item_list[jj].vip_price}}</text>
						</view>
						<text class="Selected2" style="position: relative;top: 43rpx;">已选：“
							<text v-for="(a,q) in arr" :key="q">
								{{a.name+','}}
							</text>
							”</text>
					</view>
				</view>
				<view class="solid"></view>
				<view class="type2 " v-for="(i,j) in goods[isfood].sku.spec_list" :key="j">
					<text>{{i.spec_name}}</text>
					<view class="flex">
						<view v-for="(item,index) in i.item_list" :key="index" class="item2 " :class="{item1:index==jj}"
							@click.stop="jj = index">{{item.item_name}}</view>
					</view>
				</view>
				<view class="type2 " v-for="(i,j) in goods[isfood].sku.attribute_list" :key="j">
					<text>{{i.attribute_name}}</text>
					<view class="flex">
						<view v-for="(t,p) in i.name" :key="p" class="item2 " :class="{item1: arr[j].name == i.name[p]}"
							@click.stop="handleArr(t,j)">{{t}}</view>
					</view>
				</view>
				<!-- arr[j].attribute_name == i.attribute_name && -->
				<view class="solid"></view>
				<view class="num2 flex-cb">
					<text>购买数量</text>
					<view class="num_div flex-cb">
						<view @click.stop="num<=1?1:num--">-</view>
						<view class="addnum">{{num}}</view>
						<view @click.stop="num++">+</view>
					</view>
				</view>
				<view class="flex-c button" @click="handlecart">加入购物车</view>
			</view>
		</view>
		<uni-popup ref="popup" type="center" :mask-click="false">
			<view class="popup-box">
				<view class="popup-title">
					欢迎就餐，请开始点餐吧~
				</view>
				<view class="person-box">
					<view class="table">
						桌号：{{table}}
					</view>
					<view class="person-num">
						<text>就餐人数：</text>
						<input type="number" v-model="personNum" placeholder="请填写就餐人数">
					</view>
				</view>
				<button @click="confirmNum">去选餐</button>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				personNum:'',
				h: 0,
				jj: 0,
				url: '',
				isadd: 0, //加购选规格显示
				inputdata: '',
				isclass: 0,
				isall: 0, //是否全选
				num: 1, //商品数量
				cartlist: [], //购物车列表
				selectId: [],
				iscart: 0, //购物车显示隐藏
				list: [], //分类列表
				goods: [], //商品列表
				tabCur: 0,
				mainCur: 0,
				verticalNavTop: 0,
				load: true,
				arr: [], //存储选择信息
				mch_id: null, //店铺id
				table_id: null, //桌号id
				table: '', //桌号
				isfood: 0,
				money: 0.00,
			};
		},
		onLoad(option) {
			this.$refs.popup.open('center')
			console.log(option);
			if (option.i == 1) {
				console.log('123');
				this.mch_id = option.mch_id
				this.table_id = option.table_id

			} else if (option.q != '') {
				console.log('断点');
				// if(uni.getStorageSync('access_token') == ''){
				// 	this.$utils.isgologin()
				// }
				const q = decodeURIComponent(option.q) // 获取到二维码原始链接内容
				let t = JSON.parse(JSON.stringify(q))
				var Request = new Object();
				Request = this.GetRequest(t);
				console.log(Request);
				this.mch_id = Request['ttps://guizhouchenxun.com/mini/tables/?mch_id']
				this.table_id = Request.table_id
				console.log("拿到", this.mch_id)
				// this.getgoods(this.table_id)
				getApp().globalData.mch_id = this.mch_id;
			}
			this.$api.tables_num({}, this.table_id, 1).then(res => {
				if (res.code == 200001) {
					this.table = res.data.name
				}
			})
			this.$api.user_goods_categories({}, this.mch_id, 1).then(res => {
				if (res.code == 200001) {
					this.list = res.data
					for (let i = 0; i < this.list.length; i++) {
						this.list[i].index = i
					}
					this.$api.user_goods_categories_list({}, this.list[0].id, 1).then(res => {
						if (res.code == 200001) {
							this.goods = res.data
							console.log(this.goods, '列表========');
						}
					})
				}
			})
			this.url = this.$base
			uni.getStorage({
				key: 'height',
				success: (res) => {
					this.h = res.data
				}
			})
		},
		onShow() {
			// if(uni.getStorageSync('access_token') == ''){
			// 	this.$utils.isgologin(this.mch_id)
			// }
			if (uni.getStorageSync('access_token') == '') {
				uni.navigateTo({
					url: '/pageB/login/login'
				})
			}
			this.getcart(this.mch_id)
			this.isadd = 0
			this.isall = 0
			this.iscart = 0
			this.money = 0.00
			this.selectId = []
		},
		methods: {
			confirmNum(){
				if(this.personNum == 0 || this.personNum == ''){
					uni.showToast({
						title:"请填写人数",
						duration:1000,
						icon:'none'
					})
					return
				}
				this.$refs.popup.close();
			},
			GetRequest(url) { //获取二维码信息
				let theRequest = new Object();
				if (url.indexOf("?") != -1) {
					let str = url.substr(1);
					let strs = str.split("&");
					for (var i = 0; i < strs.length; i++) {
						theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
					}
				}
				return theRequest;
			},
			handleall(i) { //全选
				this.selectId = []
				this.money = 0.00
				this.isall = i
				if (i == 1) { //全选状态
					for (let i = 0; i < this.cartlist.length; i++) {
						this.cartlist[i].selected = 1
						this.money += parseFloat(this.cartlist[i].goods_price) * parseFloat(this.cartlist[i].number)
					}
				} else {
					for (let i = 0; i < this.cartlist.length; i++) {
						this.cartlist[i].selected = 0
					}
					this.money = 0.00
				}
				this.money = this.$utils.changeTwoDecimal_f(this.money)
			},
			choice(index) {
				//当再次被选中时，取消当前选中项
				if (this.cartlist[index].selected == true) {
					this.cartlist[index].selected = false;
					this.all()
				} else {
					this.cartlist[index].selected = true;
					this.all()
				}
			},
			all() {
				let istrue = 0
				let t = 0
				for (let i = 0; i < this.cartlist.length; i++) {

					// if(this.cartlist[i].selected == true){
					t += parseFloat(this.cartlist[i].goods_price) * parseFloat(this.cartlist[i].number)
					// istrue++
					// if(istrue ==  this.cartlist.length){
					// 	this.isall = 1
					// }else{
					// 	this.isall = 0
					// }
					// }
				}
				this.money = this.$utils.changeTwoDecimal_f(t)
			},
			handleback() {
				uni.switchTab({
					url: '/pages/tabbar/index'
				})
			},
			handleinput(e) {
				this.inputdata = e.detail.value
			},
			handleArr(t, j) { //选择属性
				this.arr[j].name = t
			},
			JG(i, t) {
				console.log(i,'这是啥');
				this.arr = []
				this.arr = JSON.parse(JSON.stringify(this.goods[t].sku.attribute_list));
				for (let i = 0; i < this.arr.length; i++) {
					this.arr[i].name.splice(1, 3)
				}
				this.isadd = 1
				this.isfood = t
				this.num = 1

			},
			getcart(id) {
				this.$api.cart_list({
					type: 2
				}, id, 1).then(res => { //购物车列表
					console.log(res);
					this.cartlist = res.data
					this.all()
					console.log(this.cartlist);
				})
			},
			getfoodlist() { //获取商品列表
				this.$api.user_goods_categories({}, this.mch_id, 1).then(res => {
					if (res.code == 200001) {
						this.list = res.data
					}
				})
			},
			TabSelect(e) { //获取分类商品
				this.tabCur = e.currentTarget.dataset.id;
				this.mainCur = e.currentTarget.dataset.id;
				this.verticalNavTop = (e.currentTarget.dataset.id) * 50
				console.log(this.tabCur);
				this.$api.user_goods_categories_list({}, this.list[this.tabCur].id, 1).then(res => {
					if (res.code == 200001) {
						this.goods = res.data
					}
				})

			},
			scrolltolower(e) {
				console.log(e);
				this.tabCur = this.list[this.list.length - 1].index
			},
			handlecart(id) { //加入购物车\
				if(this.goods[this.isfood].sku.spec_list[0].item_list[0].stock <= 0){
					uni.showToast({
						title:'该商品库存不足',
						icon:'none'
					})
					return
				}
				let newarr = []
				console.log(this.goods, 'this.goods===========');
				for (let i = 0; i < this.arr.length; i++) {
					newarr.push(this.arr[i].name[0])
				}
				if (newarr.length !== 0) {
					this.$api.ADD_cart({
						spec_name: this.goods[this.isfood].sku.spec_list[0].spec_name,
						spec_item_name: this.goods[this.isfood].sku.spec_list[0].item_list[this.jj].item_name,
						attribute_name: newarr,
						number: this.num,
						type: 2
					}, this.goods[this.isfood].id, 1).then(res => {
						console.log(res);
						this.isall = 0
						this.iscart = 0
						this.num = 1
						this.isadd = 0
						this.getcart(this.mch_id)
					})
				}

			},
			got() {
				let t = [],
					d = []
				for (let i = 0; i < this.cartlist.length; i++) {
					t[i] = this.cartlist[i]
					d[i] = this.cartlist[i].id
				}
				if (t.length == 0) {
					uni.showToast({
						title: '请选择商品后结算',
						icon: "none"
					})
					return
				}
				this.isadd = 0
				this.isall = 0
				this.iscart = 0
				uni.navigateTo({
					url: './order?data=' + JSON.stringify(t) + '&id=' + JSON.stringify(d) + '&table_id=' + this
						.table_id + '&table=' + this.table + '&people_number=' + this.personNum
				})
			},
			deteles() {
				this.$api.cartsClear({
					type: 2
				}, this.mch_id, 1).then(res => {
					console.log(res);
					if (res.code == 200001) {
						this.money = 0.00
						this.getcart(this.mch_id)
						this.isall = 0
					}
				})
			},
			__num(item, i) {
				this.$api.cart_delete({}, this.cartlist[i].id, 1).then(res => {
					console.log(res);
					if (res.code == 200001) {
						this.getcart(this.mch_id)
					}
				})
			},
			addNum(item) {
				this.$api.ADD_cart({
					spec_name: item.goods_spec_name,
					spec_item_name: item.goods_spec_item_name,
					attribute_name: item.goods_attribute,
					number: 1,
					type: 2
				}, item.goods_id, 1).then(res => {
					console.log(res);
					this.getcart(this.mch_id)
				})
			},
			VerticalMain(e) {
				// #ifdef MP-ALIPAY
				return false //支付宝小程序暂时不支持双向联动 
				// #endif
				let that = this;
				let tabHeight = 0;
				if (this.load) {
					for (let i = 0; i < this.list.length; i++) {
						let view = uni.createSelectorQuery().select("#main-" + this.list[i].index);
						view.fields({
							size: true
						}, data => {
							this.list[i].top = tabHeight;
							tabHeight = tabHeight + data.height;
							this.list[i].bottom = tabHeight;
						}).exec();
					}
					this.load = false
				}
				let scrollTop = e.detail.scrollTop + 10;
				for (let i = 0; i < this.list.length; i++) {
					if (scrollTop > this.list[i].top && scrollTop < this.list[i].bottom) {
						this.verticalNavTop = (this.list[i].index) * 50
						this.tabCur = this.list[i].index
						return false
					}
				}
			}
		}
	}
</script>

<style lang="scss">
	.popup-box {
		width: 70vw;
		height: 35vh;
		background: #eee;
		padding: 30rpx;
		border-radius: 15rpx;
		display: flex;
		flex-direction: column;
		align-items: center;

		.popup-title {
			font-size: 34rpx;
		}

		.person-box {
			width: 90%;
			text-align: center;
			margin: 70rpx 0;
			background: #fff;
			border-radius: 10rpx;
			padding: 20rpx;
			
			>text{
				margin: 10rpx;
			}
			
			.person-num{
				display: flex;
				font-size: 24rpx;
				margin-top: 30rpx;
			}
		}
		
		>button{
			background-color: #1CD699;
			color: #fff;
		}
	}

	.head {
		height: 88rpx;
		background-color: #fff;
		padding: 5rpx 0 7rpx 26rpx;

		.home {
			width: 58rpx;
			height: 58rpx;
			background: #FFFFFF;
			border: 1px solid #EBEBEB;
			border-radius: 50%;

			.cuIcon-home {
				font-size: 33rpx;
			}
		}

		.search {
			width: 446rpx;
			height: 66rpx;
			margin-left: 26rpx;
			border-radius: 38rpx;
			background: #F8F8F8;

			.img1 {
				width: 25rpx;
				height: 25rpx;
			}

			input {
				font-size: 24rpx;
				padding-left: 10rpx;
			}

			.img2 {
				width: 31rpx;
				height: 31rpx;
			}
		}
	}

	.head_title {
		height: 103rpx;
		padding: 29rpx 30rpx;
		border-radius: 0 0 20rpx 20rpx;

		text {
			font-weight: bold;
			font-size: 26rpx;
			color: #333;
		}

		.num {
			font-size: 32rpx;
		}
	}

	.cart2 {
		width: 750rpx;
		min-height: 970rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 0px 0px;
		position: fixed;
		bottom: 0;
		padding-bottom: 24rpx;

		.img_title2 {
			margin: 15rpx 0 0 30rpx;

			image {
				width: 240rpx;
				height: 240rpx;
				margin-right: 20rpx;
				border-radius: 20rpx;
			}

			.title2 {
				width: 408rpx;
				max-height: 108rpx;
				font-size: 34rpx;
				display: inline-block;
				font-weight: 400;
				color: #000000;
				line-height: 60rpx;
				overflow: hidden;
				text-overflow: ellipsis;
			}

			.money2 {
				height: 70rpx;
				margin-top: 8rpx;
				font-weight: bold;
				font-size: 50rpx;
				color: #333;

				.vipPrice2 {
					margin-left: 9rpx;
					font-size: 30rpx;
					color: #FF2E2E;
				}
			}

			.Selected2 {
				font-size: 28rpx;
				// color: #999;
			}
		}

		.solid {
			width: 720rpx;
			margin: auto;
			margin-top: 32rpx;
		}

		.type2 {
			padding: 23rpx 0 7rpx 28rpx;
			margin-bottom: 56rpx;

			text {
				font-size: 32rpx;
				color: #333;
			}

			.flex {
				margin-top: 22rpx;
				font-size: 28rpx;

				.item2 {
					text-align: center;
					line-height: 60rpx;
					width: 120rpx;
					height: 60rpx;
					background: #F2F2F2;
					margin-right: 20rpx;
					border-radius: 10rpx;
					color: #999999;
				}

				.item1 {
					background: #1CD699;
					color: #fff;
				}
			}
		}

		.num2 {
			padding: 31rpx 30rpx 0 28rpx;

			text {
				font-size: 32rpx;
				color: #333;
			}

			.num_div {
				view {
					width: 60rpx;
					height: 60rpx;
					background: #F2F2F2;
					text-align: center;
					line-height: 60rpx;
					border-radius: 10rpx;
				}

				.addnum {
					width: 100rpx;
					margin: 0 20rpx;
				}
			}
		}

		.button {
			width: 690rpx;
			height: 74rpx;
			background: #1CD699;
			border-radius: 37rpx;
			color: #fff;
			margin: auto;
			margin-top: 70rpx;
		}
	}

	.fen_index {
		font-size: 30rpx;
		color: #1CD699;
	}

	.fixed {
		position: fixed;
		z-index: 99;
	}

	.VerticalNav.nav {
		width: 178upx;
		height: 88rpx;
		white-space: initial;
	}

	.VerticalNav.nav .cu-item {
		width: 100%;
		text-align: center;
		margin: 0;
		padding: 0;
		// margin-bottom: 100rpx;
		border: none;
		height: 88rpx;
		position: relative;
	}

	.VerticalNav.nav .cu-item.cur {
		background-color: #fff;
		padding: 0;
		margin: 0;
		// margin-bottom: 100rpx;
	}

	.VerticalBox {
		margin-top: 10rpx;
		background: #F8F8F8;
		display: flex;
	}

	.VerticalMain {
		flex: 1;
	}

	.VerticalMain_list {
		padding-left: 10rpx;

		image {
			width: 176rpx;
			height: 176rpx;
			border-radius: 10rpx;
		}

		.item {
			margin-bottom: 56rpx;
			padding-top: 8rpx;
		}

		.item:nth-last-of-type(1) {
			margin-bottom: 39rpx;
		}

		.div_text {
			flex: 1;
			padding-right: 20rpx;
			margin-left: 20rpx;

			.title_item {

				// padding-top: 16rpx;
				.num {
					font-size: 28rpx;
					color: #999999;
					margin-right: 8rpx;
					font-weight: nowrap;
					white-space: nowrap;
					// margin-left: 95rpx;
				}
			}

			.title {
				width: 280rpx;
				height: auto;
				margin-bottom: 3rpx;
				text-overflow: ellipsis;
				overflow: hidden;
				color: #252525;
				font-size: 28rpx;
				font-weight: bold;
			}

			.price_f {}

			.price {
				font-size: 24rpx;
				position: relative;
				top: 20rpx;
				color: #333333;
			}

			.vipPrice {
				font-size: 26rpx;
				font-weight: bold;
				color: #FF2E2E;

			}

			.jifen {
				font-size: 26rpx;
				color: #FF6F10;
			}

			.button {
				width: 110rpx;
				height: 50rpx;
				background: #1CD699;
				border-radius: 30rpx;
				color: #fff;
				font-size: 22rpx;
			}
		}
	}

	.foot {
		width: 750rpx;
		height: 147rpx;
		background: #fff;
		position: fixed;
		z-index: 1;
		bottom: 0;
		left: 0;
		padding: 25rpx 20rpx;

		.money,
		.button {
			height: 100rpx;

			image {
				width: 50rpx;
				height: 56rpx;
			}

			text {
				font-size: 30rpx;
				margin-left: 31rpx;
				font-weight: bold;
				color: #fff;
			}
		}

		.money {
			width: 572rpx;
			border-radius: 50rpx 0 0 50rpx;
			background: #000;
			padding: 0 22rpx;
			padding-left: 44rpx;
			position: relative;

			.position {
				position: absolute;
				left: 75rpx;
				top: 22rpx;
				border-radius: 50%;
				font-size: 22rpx;
				color: #fff;
				background: #FF6F10;
				width: 30rpx;
				height: 30rpx;
			}
		}

		.button {
			width: 168rpx;
			background: #1CD699;
			border-radius: 0px 50rpx 50rpx 0px;
			color: #fff;
		}
	}

	.modal_view_div {
		width: 750rpx;
		height: 634rpx;
		text-align: center;
		position: absolute;
		bottom: 0;
		left: 0;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0px 0px;
		overflow: hidden;

		.text {
			height: 84rpx;
			background: #F8F8F8;
			padding: 32rpx 22rpx;
		}

		.cuIcon-round,
		.cuIcon-roundcheckfill {
			font-size: 44rpx;
			color: #CCCCCC;
			margin-right: 11rpx;
		}

		.cuIcon-roundcheckfill {
			color: #1CD699;
		}

		image {
			width: 224rpx;
			height: 337rpx;
			margin-top: 31rpx;
		}

		.screen-swiper {
			height: 400rpx;
			padding: 26rpx 36rpx 0 32rpx;

			.cart {
				margin-bottom: 59rpx;
				text-align: left;

				.food {
					width: 240rpx;
				}

				.food_name {
					height: 69rpx;
					font-size: 24rpx;
					font-weight: bold;
					color: #252525;
					line-height: 36rpx;
				}

				.addnum {
					width: 187rpx;
					height: 44rpx;
					text-align: right;
					margin-top: 43rpx;

					// background: #FFFFFF;
					// border: 2px solid #C3C3C3;
					text {
						width: 30rpx;
						height: 30rpx;
						border-radius: 10rpx;
						border: 2px solid #e5e5e5;
						font-weight: 600;
						font-size: 30rpx;
					}

					.B {
						background-color: #1CD699;
						color: #fff;
						border: 2px solid #1CD699;
					}

					.center_num {
						width: 99rpx;
						height: 100%;
						// border-left: 2px solid #C3C3C3;
						// border-right: 2px solid #C3C3C3;
					}
				}
			}

			image {
				width: 122rpx;
				height: 122rpx;
				border-radius: 10rpx;
				margin-right: 12rpx;
			}
		}
	}

	.button_div {
		width: 710rpx;
		height: 100rpx;
		border-radius: 50rpx;
		color: #fff;
		z-index: 999;
		background: #1CD699;
		margin: 20rpx auto;
	}
</style>